
// Generated from Nasm.g4 by ANTLR 4.9.3


#include "NasmListener.h"
#include "NasmVisitor.h"

#include "NasmParser.h"


using namespace antlrcpp;
using namespace dspnasm;
using namespace antlr4;

NasmParser::NasmParser(TokenStream *input) : Parser(input) {
  _interpreter = new atn::ParserATNSimulator(this, _atn, _decisionToDFA, _sharedContextCache);
}

NasmParser::~NasmParser() {
  delete _interpreter;
}

std::string NasmParser::getGrammarFileName() const {
  return "Nasm.g4";
}

const std::vector<std::string>& NasmParser::getRuleNames() const {
  return _ruleNames;
}

dfa::Vocabulary& NasmParser::getVocabulary() const {
  return _vocabulary;
}


//----------------- ProgramContext ------------------------------------------------------------------

NasmParser::ProgramContext::ProgramContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::ProgramContext::EOF() {
  return getToken(NasmParser::EOF, 0);
}

std::vector<NasmParser::StatementContext *> NasmParser::ProgramContext::statement() {
  return getRuleContexts<NasmParser::StatementContext>();
}

NasmParser::StatementContext* NasmParser::ProgramContext::statement(size_t i) {
  return getRuleContext<NasmParser::StatementContext>(i);
}


size_t NasmParser::ProgramContext::getRuleIndex() const {
  return NasmParser::RuleProgram;
}

void NasmParser::ProgramContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProgram(this);
}

void NasmParser::ProgramContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProgram(this);
}


antlrcpp::Any NasmParser::ProgramContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitProgram(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::ProgramContext* NasmParser::program() {
  ProgramContext *_localctx = _tracker.createInstance<ProgramContext>(_ctx, getState());
  enterRule(_localctx, 0, NasmParser::RuleProgram);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(59);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << NasmParser::Global)
      | (1ULL << NasmParser::Externed)
      | (1ULL << NasmParser::Section)
      | (1ULL << NasmParser::Times)
      | (1ULL << NasmParser::Db)
      | (1ULL << NasmParser::Dw)
      | (1ULL << NasmParser::Dd)
      | (1ULL << NasmParser::Dq)
      | (1ULL << NasmParser::ADD)
      | (1ULL << NasmParser::SUB)
      | (1ULL << NasmParser::MVK)
      | (1ULL << NasmParser::MV)
      | (1ULL << NasmParser::NOP)
      | (1ULL << NasmParser::Id)
      | (1ULL << NasmParser::Lbrace))) != 0)) {
      setState(56);
      statement();
      setState(61);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(62);
    match(NasmParser::EOF);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StatementContext ------------------------------------------------------------------

NasmParser::StatementContext::StatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

NasmParser::DeclareContext* NasmParser::StatementContext::declare() {
  return getRuleContext<NasmParser::DeclareContext>(0);
}

NasmParser::InstructionPacketContext* NasmParser::StatementContext::instructionPacket() {
  return getRuleContext<NasmParser::InstructionPacketContext>(0);
}


size_t NasmParser::StatementContext::getRuleIndex() const {
  return NasmParser::RuleStatement;
}

void NasmParser::StatementContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStatement(this);
}

void NasmParser::StatementContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStatement(this);
}


antlrcpp::Any NasmParser::StatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitStatement(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::StatementContext* NasmParser::statement() {
  StatementContext *_localctx = _tracker.createInstance<StatementContext>(_ctx, getState());
  enterRule(_localctx, 2, NasmParser::RuleStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(66);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case NasmParser::Global:
      case NasmParser::Externed:
      case NasmParser::Section:
      case NasmParser::Times:
      case NasmParser::Db:
      case NasmParser::Dw:
      case NasmParser::Dd:
      case NasmParser::Dq:
      case NasmParser::Id:
      case NasmParser::Lbrace: {
        enterOuterAlt(_localctx, 1);
        setState(64);
        declare();
        break;
      }

      case NasmParser::ADD:
      case NasmParser::SUB:
      case NasmParser::MVK:
      case NasmParser::MV:
      case NasmParser::NOP: {
        enterOuterAlt(_localctx, 2);
        setState(65);
        instructionPacket();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DeclareContext ------------------------------------------------------------------

NasmParser::DeclareContext::DeclareContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::DeclareContext::Section() {
  return getToken(NasmParser::Section, 0);
}

tree::TerminalNode* NasmParser::DeclareContext::Id() {
  return getToken(NasmParser::Id, 0);
}

tree::TerminalNode* NasmParser::DeclareContext::Global() {
  return getToken(NasmParser::Global, 0);
}

tree::TerminalNode* NasmParser::DeclareContext::Externed() {
  return getToken(NasmParser::Externed, 0);
}

NasmParser::IdTailContext* NasmParser::DeclareContext::idTail() {
  return getRuleContext<NasmParser::IdTailContext>(0);
}

tree::TerminalNode* NasmParser::DeclareContext::Lbrace() {
  return getToken(NasmParser::Lbrace, 0);
}

tree::TerminalNode* NasmParser::DeclareContext::Bits() {
  return getToken(NasmParser::Bits, 0);
}

NasmParser::NumContext* NasmParser::DeclareContext::num() {
  return getRuleContext<NasmParser::NumContext>(0);
}

tree::TerminalNode* NasmParser::DeclareContext::Rbrace() {
  return getToken(NasmParser::Rbrace, 0);
}

tree::TerminalNode* NasmParser::DeclareContext::Times() {
  return getToken(NasmParser::Times, 0);
}

NasmParser::SizeContext* NasmParser::DeclareContext::size() {
  return getRuleContext<NasmParser::SizeContext>(0);
}

NasmParser::TypeContext* NasmParser::DeclareContext::type() {
  return getRuleContext<NasmParser::TypeContext>(0);
}

NasmParser::DataContext* NasmParser::DeclareContext::data() {
  return getRuleContext<NasmParser::DataContext>(0);
}


size_t NasmParser::DeclareContext::getRuleIndex() const {
  return NasmParser::RuleDeclare;
}

void NasmParser::DeclareContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDeclare(this);
}

void NasmParser::DeclareContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDeclare(this);
}


antlrcpp::Any NasmParser::DeclareContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitDeclare(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::DeclareContext* NasmParser::declare() {
  DeclareContext *_localctx = _tracker.createInstance<DeclareContext>(_ctx, getState());
  enterRule(_localctx, 4, NasmParser::RuleDeclare);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(89);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case NasmParser::Section: {
        enterOuterAlt(_localctx, 1);
        setState(68);
        match(NasmParser::Section);
        setState(69);
        match(NasmParser::Id);
        break;
      }

      case NasmParser::Global: {
        enterOuterAlt(_localctx, 2);
        setState(70);
        match(NasmParser::Global);
        setState(71);
        match(NasmParser::Id);
        break;
      }

      case NasmParser::Externed: {
        enterOuterAlt(_localctx, 3);
        setState(72);
        match(NasmParser::Externed);
        setState(73);
        match(NasmParser::Id);
        break;
      }

      case NasmParser::Id: {
        enterOuterAlt(_localctx, 4);
        setState(74);
        match(NasmParser::Id);
        setState(75);
        idTail();
        break;
      }

      case NasmParser::Lbrace: {
        enterOuterAlt(_localctx, 5);
        setState(76);
        match(NasmParser::Lbrace);
        setState(77);
        match(NasmParser::Bits);
        setState(78);
        num();
        setState(79);
        match(NasmParser::Rbrace);
        break;
      }

      case NasmParser::Times: {
        enterOuterAlt(_localctx, 6);
        setState(81);
        match(NasmParser::Times);
        setState(82);
        num();
        setState(83);
        size();
        setState(84);
        type();
        break;
      }

      case NasmParser::Db:
      case NasmParser::Dw:
      case NasmParser::Dd:
      case NasmParser::Dq: {
        enterOuterAlt(_localctx, 7);
        setState(86);
        size();
        setState(87);
        data();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IdTailContext ------------------------------------------------------------------

NasmParser::IdTailContext::IdTailContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::IdTailContext::Colon() {
  return getToken(NasmParser::Colon, 0);
}

tree::TerminalNode* NasmParser::IdTailContext::Equ() {
  return getToken(NasmParser::Equ, 0);
}

NasmParser::ExprContext* NasmParser::IdTailContext::expr() {
  return getRuleContext<NasmParser::ExprContext>(0);
}


size_t NasmParser::IdTailContext::getRuleIndex() const {
  return NasmParser::RuleIdTail;
}

void NasmParser::IdTailContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIdTail(this);
}

void NasmParser::IdTailContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIdTail(this);
}


antlrcpp::Any NasmParser::IdTailContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitIdTail(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::IdTailContext* NasmParser::idTail() {
  IdTailContext *_localctx = _tracker.createInstance<IdTailContext>(_ctx, getState());
  enterRule(_localctx, 6, NasmParser::RuleIdTail);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(94);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case NasmParser::Colon: {
        enterOuterAlt(_localctx, 1);
        setState(91);
        match(NasmParser::Colon);
        break;
      }

      case NasmParser::Equ: {
        enterOuterAlt(_localctx, 2);
        setState(92);
        match(NasmParser::Equ);
        setState(93);
        expr();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DataContext ------------------------------------------------------------------

NasmParser::DataContext::DataContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<NasmParser::TypeContext *> NasmParser::DataContext::type() {
  return getRuleContexts<NasmParser::TypeContext>();
}

NasmParser::TypeContext* NasmParser::DataContext::type(size_t i) {
  return getRuleContext<NasmParser::TypeContext>(i);
}

std::vector<tree::TerminalNode *> NasmParser::DataContext::Comma() {
  return getTokens(NasmParser::Comma);
}

tree::TerminalNode* NasmParser::DataContext::Comma(size_t i) {
  return getToken(NasmParser::Comma, i);
}


size_t NasmParser::DataContext::getRuleIndex() const {
  return NasmParser::RuleData;
}

void NasmParser::DataContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterData(this);
}

void NasmParser::DataContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitData(this);
}


antlrcpp::Any NasmParser::DataContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitData(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::DataContext* NasmParser::data() {
  DataContext *_localctx = _tracker.createInstance<DataContext>(_ctx, getState());
  enterRule(_localctx, 8, NasmParser::RuleData);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(96);
    type();
    setState(101);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == NasmParser::Comma) {
      setState(97);
      match(NasmParser::Comma);
      setState(98);
      type();
      setState(103);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TypeContext ------------------------------------------------------------------

NasmParser::TypeContext::TypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

NasmParser::NumContext* NasmParser::TypeContext::num() {
  return getRuleContext<NasmParser::NumContext>(0);
}

NasmParser::SignContext* NasmParser::TypeContext::sign() {
  return getRuleContext<NasmParser::SignContext>(0);
}

tree::TerminalNode* NasmParser::TypeContext::Id() {
  return getToken(NasmParser::Id, 0);
}

tree::TerminalNode* NasmParser::TypeContext::Char() {
  return getToken(NasmParser::Char, 0);
}


size_t NasmParser::TypeContext::getRuleIndex() const {
  return NasmParser::RuleType;
}

void NasmParser::TypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterType(this);
}

void NasmParser::TypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitType(this);
}


antlrcpp::Any NasmParser::TypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitType(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::TypeContext* NasmParser::type() {
  TypeContext *_localctx = _tracker.createInstance<TypeContext>(_ctx, getState());
  enterRule(_localctx, 10, NasmParser::RuleType);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(110);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case NasmParser::Decimal:
      case NasmParser::Octal:
      case NasmParser::Hex:
      case NasmParser::Binary:
      case NasmParser::Add:
      case NasmParser::Sub: {
        enterOuterAlt(_localctx, 1);
        setState(105);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if (_la == NasmParser::Add

        || _la == NasmParser::Sub) {
          setState(104);
          sign();
        }
        setState(107);
        num();
        break;
      }

      case NasmParser::Id: {
        enterOuterAlt(_localctx, 2);
        setState(108);
        match(NasmParser::Id);
        break;
      }

      case NasmParser::Char: {
        enterOuterAlt(_localctx, 3);
        setState(109);
        match(NasmParser::Char);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SignContext ------------------------------------------------------------------

NasmParser::SignContext::SignContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::SignContext::Add() {
  return getToken(NasmParser::Add, 0);
}

tree::TerminalNode* NasmParser::SignContext::Sub() {
  return getToken(NasmParser::Sub, 0);
}


size_t NasmParser::SignContext::getRuleIndex() const {
  return NasmParser::RuleSign;
}

void NasmParser::SignContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSign(this);
}

void NasmParser::SignContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSign(this);
}


antlrcpp::Any NasmParser::SignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitSign(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::SignContext* NasmParser::sign() {
  SignContext *_localctx = _tracker.createInstance<SignContext>(_ctx, getState());
  enterRule(_localctx, 12, NasmParser::RuleSign);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(112);
    _la = _input->LA(1);
    if (!(_la == NasmParser::Add

    || _la == NasmParser::Sub)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- InstructionPacketContext ------------------------------------------------------------------

NasmParser::InstructionPacketContext::InstructionPacketContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<NasmParser::InstructionContext *> NasmParser::InstructionPacketContext::instruction() {
  return getRuleContexts<NasmParser::InstructionContext>();
}

NasmParser::InstructionContext* NasmParser::InstructionPacketContext::instruction(size_t i) {
  return getRuleContext<NasmParser::InstructionContext>(i);
}

std::vector<tree::TerminalNode *> NasmParser::InstructionPacketContext::Or() {
  return getTokens(NasmParser::Or);
}

tree::TerminalNode* NasmParser::InstructionPacketContext::Or(size_t i) {
  return getToken(NasmParser::Or, i);
}


size_t NasmParser::InstructionPacketContext::getRuleIndex() const {
  return NasmParser::RuleInstructionPacket;
}

void NasmParser::InstructionPacketContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInstructionPacket(this);
}

void NasmParser::InstructionPacketContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInstructionPacket(this);
}


antlrcpp::Any NasmParser::InstructionPacketContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitInstructionPacket(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::InstructionPacketContext* NasmParser::instructionPacket() {
  InstructionPacketContext *_localctx = _tracker.createInstance<InstructionPacketContext>(_ctx, getState());
  enterRule(_localctx, 14, NasmParser::RuleInstructionPacket);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(114);
    instruction();
    setState(119);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == NasmParser::Or) {
      setState(115);
      match(NasmParser::Or);
      setState(116);
      instruction();
      setState(121);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- InstructionContext ------------------------------------------------------------------

NasmParser::InstructionContext::InstructionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

NasmParser::ThreeOpContext* NasmParser::InstructionContext::threeOp() {
  return getRuleContext<NasmParser::ThreeOpContext>(0);
}

std::vector<NasmParser::OperandContext *> NasmParser::InstructionContext::operand() {
  return getRuleContexts<NasmParser::OperandContext>();
}

NasmParser::OperandContext* NasmParser::InstructionContext::operand(size_t i) {
  return getRuleContext<NasmParser::OperandContext>(i);
}

std::vector<tree::TerminalNode *> NasmParser::InstructionContext::Comma() {
  return getTokens(NasmParser::Comma);
}

tree::TerminalNode* NasmParser::InstructionContext::Comma(size_t i) {
  return getToken(NasmParser::Comma, i);
}

tree::TerminalNode* NasmParser::InstructionContext::FuncUnit() {
  return getToken(NasmParser::FuncUnit, 0);
}

NasmParser::TwoOpContext* NasmParser::InstructionContext::twoOp() {
  return getRuleContext<NasmParser::TwoOpContext>(0);
}

NasmParser::OneOpContext* NasmParser::InstructionContext::oneOp() {
  return getRuleContext<NasmParser::OneOpContext>(0);
}

NasmParser::NoneOpContext* NasmParser::InstructionContext::noneOp() {
  return getRuleContext<NasmParser::NoneOpContext>(0);
}


size_t NasmParser::InstructionContext::getRuleIndex() const {
  return NasmParser::RuleInstruction;
}

void NasmParser::InstructionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInstruction(this);
}

void NasmParser::InstructionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInstruction(this);
}


antlrcpp::Any NasmParser::InstructionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitInstruction(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::InstructionContext* NasmParser::instruction() {
  InstructionContext *_localctx = _tracker.createInstance<InstructionContext>(_ctx, getState());
  enterRule(_localctx, 16, NasmParser::RuleInstruction);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(150);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 12, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(122);
      threeOp();
      setState(124);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == NasmParser::FuncUnit) {
        setState(123);
        match(NasmParser::FuncUnit);
      }
      setState(126);
      operand();
      setState(127);
      match(NasmParser::Comma);
      setState(128);
      operand();
      setState(129);
      match(NasmParser::Comma);
      setState(130);
      operand();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(132);
      twoOp();
      setState(134);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == NasmParser::FuncUnit) {
        setState(133);
        match(NasmParser::FuncUnit);
      }
      setState(136);
      operand();
      setState(137);
      match(NasmParser::Comma);
      setState(138);
      operand();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(140);
      oneOp();
      setState(142);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == NasmParser::FuncUnit) {
        setState(141);
        match(NasmParser::FuncUnit);
      }
      setState(144);
      operand();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(146);
      noneOp();
      setState(148);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == NasmParser::FuncUnit) {
        setState(147);
        match(NasmParser::FuncUnit);
      }
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ThreeOpContext ------------------------------------------------------------------

NasmParser::ThreeOpContext::ThreeOpContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::ThreeOpContext::ADD() {
  return getToken(NasmParser::ADD, 0);
}

tree::TerminalNode* NasmParser::ThreeOpContext::SUB() {
  return getToken(NasmParser::SUB, 0);
}


size_t NasmParser::ThreeOpContext::getRuleIndex() const {
  return NasmParser::RuleThreeOp;
}

void NasmParser::ThreeOpContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterThreeOp(this);
}

void NasmParser::ThreeOpContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitThreeOp(this);
}


antlrcpp::Any NasmParser::ThreeOpContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitThreeOp(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::ThreeOpContext* NasmParser::threeOp() {
  ThreeOpContext *_localctx = _tracker.createInstance<ThreeOpContext>(_ctx, getState());
  enterRule(_localctx, 18, NasmParser::RuleThreeOp);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(152);
    _la = _input->LA(1);
    if (!(_la == NasmParser::ADD

    || _la == NasmParser::SUB)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TwoOpContext ------------------------------------------------------------------

NasmParser::TwoOpContext::TwoOpContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::TwoOpContext::MV() {
  return getToken(NasmParser::MV, 0);
}

tree::TerminalNode* NasmParser::TwoOpContext::MVK() {
  return getToken(NasmParser::MVK, 0);
}


size_t NasmParser::TwoOpContext::getRuleIndex() const {
  return NasmParser::RuleTwoOp;
}

void NasmParser::TwoOpContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTwoOp(this);
}

void NasmParser::TwoOpContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTwoOp(this);
}


antlrcpp::Any NasmParser::TwoOpContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitTwoOp(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::TwoOpContext* NasmParser::twoOp() {
  TwoOpContext *_localctx = _tracker.createInstance<TwoOpContext>(_ctx, getState());
  enterRule(_localctx, 20, NasmParser::RuleTwoOp);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(154);
    _la = _input->LA(1);
    if (!(_la == NasmParser::MVK

    || _la == NasmParser::MV)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- OneOpContext ------------------------------------------------------------------

NasmParser::OneOpContext::OneOpContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::OneOpContext::NOP() {
  return getToken(NasmParser::NOP, 0);
}


size_t NasmParser::OneOpContext::getRuleIndex() const {
  return NasmParser::RuleOneOp;
}

void NasmParser::OneOpContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterOneOp(this);
}

void NasmParser::OneOpContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitOneOp(this);
}


antlrcpp::Any NasmParser::OneOpContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitOneOp(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::OneOpContext* NasmParser::oneOp() {
  OneOpContext *_localctx = _tracker.createInstance<OneOpContext>(_ctx, getState());
  enterRule(_localctx, 22, NasmParser::RuleOneOp);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(156);
    match(NasmParser::NOP);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- NoneOpContext ------------------------------------------------------------------

NasmParser::NoneOpContext::NoneOpContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::NoneOpContext::NOP() {
  return getToken(NasmParser::NOP, 0);
}


size_t NasmParser::NoneOpContext::getRuleIndex() const {
  return NasmParser::RuleNoneOp;
}

void NasmParser::NoneOpContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNoneOp(this);
}

void NasmParser::NoneOpContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNoneOp(this);
}


antlrcpp::Any NasmParser::NoneOpContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitNoneOp(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::NoneOpContext* NasmParser::noneOp() {
  NoneOpContext *_localctx = _tracker.createInstance<NoneOpContext>(_ctx, getState());
  enterRule(_localctx, 24, NasmParser::RuleNoneOp);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(158);
    match(NasmParser::NOP);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- OperandContext ------------------------------------------------------------------

NasmParser::OperandContext::OperandContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

NasmParser::TypeContext* NasmParser::OperandContext::type() {
  return getRuleContext<NasmParser::TypeContext>(0);
}

NasmParser::RegsContext* NasmParser::OperandContext::regs() {
  return getRuleContext<NasmParser::RegsContext>(0);
}

NasmParser::MemoryContext* NasmParser::OperandContext::memory() {
  return getRuleContext<NasmParser::MemoryContext>(0);
}


size_t NasmParser::OperandContext::getRuleIndex() const {
  return NasmParser::RuleOperand;
}

void NasmParser::OperandContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterOperand(this);
}

void NasmParser::OperandContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitOperand(this);
}


antlrcpp::Any NasmParser::OperandContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitOperand(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::OperandContext* NasmParser::operand() {
  OperandContext *_localctx = _tracker.createInstance<OperandContext>(_ctx, getState());
  enterRule(_localctx, 26, NasmParser::RuleOperand);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(163);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case NasmParser::Decimal:
      case NasmParser::Octal:
      case NasmParser::Hex:
      case NasmParser::Binary:
      case NasmParser::Id:
      case NasmParser::Char:
      case NasmParser::Add:
      case NasmParser::Sub: {
        enterOuterAlt(_localctx, 1);
        setState(160);
        type();
        break;
      }

      case NasmParser::A0:
      case NasmParser::A1:
      case NasmParser::A2:
      case NasmParser::A3:
      case NasmParser::A4:
      case NasmParser::B0:
      case NasmParser::B1:
      case NasmParser::B2:
      case NasmParser::B3:
      case NasmParser::B4: {
        enterOuterAlt(_localctx, 2);
        setState(161);
        regs();
        break;
      }

      case NasmParser::Mul: {
        enterOuterAlt(_localctx, 3);
        setState(162);
        memory();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RegsContext ------------------------------------------------------------------

NasmParser::RegsContext::RegsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<NasmParser::RegContext *> NasmParser::RegsContext::reg() {
  return getRuleContexts<NasmParser::RegContext>();
}

NasmParser::RegContext* NasmParser::RegsContext::reg(size_t i) {
  return getRuleContext<NasmParser::RegContext>(i);
}

tree::TerminalNode* NasmParser::RegsContext::Colon() {
  return getToken(NasmParser::Colon, 0);
}


size_t NasmParser::RegsContext::getRuleIndex() const {
  return NasmParser::RuleRegs;
}

void NasmParser::RegsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRegs(this);
}

void NasmParser::RegsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRegs(this);
}


antlrcpp::Any NasmParser::RegsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitRegs(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::RegsContext* NasmParser::regs() {
  RegsContext *_localctx = _tracker.createInstance<RegsContext>(_ctx, getState());
  enterRule(_localctx, 28, NasmParser::RuleRegs);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(165);
    reg();
    setState(168);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == NasmParser::Colon) {
      setState(166);
      match(NasmParser::Colon);
      setState(167);
      reg();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RegContext ------------------------------------------------------------------

NasmParser::RegContext::RegContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::RegContext::A0() {
  return getToken(NasmParser::A0, 0);
}

tree::TerminalNode* NasmParser::RegContext::A1() {
  return getToken(NasmParser::A1, 0);
}

tree::TerminalNode* NasmParser::RegContext::A2() {
  return getToken(NasmParser::A2, 0);
}

tree::TerminalNode* NasmParser::RegContext::A3() {
  return getToken(NasmParser::A3, 0);
}

tree::TerminalNode* NasmParser::RegContext::A4() {
  return getToken(NasmParser::A4, 0);
}

tree::TerminalNode* NasmParser::RegContext::B0() {
  return getToken(NasmParser::B0, 0);
}

tree::TerminalNode* NasmParser::RegContext::B1() {
  return getToken(NasmParser::B1, 0);
}

tree::TerminalNode* NasmParser::RegContext::B2() {
  return getToken(NasmParser::B2, 0);
}

tree::TerminalNode* NasmParser::RegContext::B3() {
  return getToken(NasmParser::B3, 0);
}

tree::TerminalNode* NasmParser::RegContext::B4() {
  return getToken(NasmParser::B4, 0);
}


size_t NasmParser::RegContext::getRuleIndex() const {
  return NasmParser::RuleReg;
}

void NasmParser::RegContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterReg(this);
}

void NasmParser::RegContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitReg(this);
}


antlrcpp::Any NasmParser::RegContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitReg(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::RegContext* NasmParser::reg() {
  RegContext *_localctx = _tracker.createInstance<RegContext>(_ctx, getState());
  enterRule(_localctx, 30, NasmParser::RuleReg);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(170);
    _la = _input->LA(1);
    if (!((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << NasmParser::A0)
      | (1ULL << NasmParser::A1)
      | (1ULL << NasmParser::A2)
      | (1ULL << NasmParser::A3)
      | (1ULL << NasmParser::A4)
      | (1ULL << NasmParser::B0)
      | (1ULL << NasmParser::B1)
      | (1ULL << NasmParser::B2)
      | (1ULL << NasmParser::B3)
      | (1ULL << NasmParser::B4))) != 0))) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- MemoryContext ------------------------------------------------------------------

NasmParser::MemoryContext::MemoryContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::MemoryContext::Mul() {
  return getToken(NasmParser::Mul, 0);
}

NasmParser::LopContext* NasmParser::MemoryContext::lop() {
  return getRuleContext<NasmParser::LopContext>(0);
}

std::vector<NasmParser::RegContext *> NasmParser::MemoryContext::reg() {
  return getRuleContexts<NasmParser::RegContext>();
}

NasmParser::RegContext* NasmParser::MemoryContext::reg(size_t i) {
  return getRuleContext<NasmParser::RegContext>(i);
}

NasmParser::RopContext* NasmParser::MemoryContext::rop() {
  return getRuleContext<NasmParser::RopContext>(0);
}

tree::TerminalNode* NasmParser::MemoryContext::Lbrace() {
  return getToken(NasmParser::Lbrace, 0);
}

tree::TerminalNode* NasmParser::MemoryContext::Rbrace() {
  return getToken(NasmParser::Rbrace, 0);
}

NasmParser::NumContext* NasmParser::MemoryContext::num() {
  return getRuleContext<NasmParser::NumContext>(0);
}


size_t NasmParser::MemoryContext::getRuleIndex() const {
  return NasmParser::RuleMemory;
}

void NasmParser::MemoryContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMemory(this);
}

void NasmParser::MemoryContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMemory(this);
}


antlrcpp::Any NasmParser::MemoryContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitMemory(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::MemoryContext* NasmParser::memory() {
  MemoryContext *_localctx = _tracker.createInstance<MemoryContext>(_ctx, getState());
  enterRule(_localctx, 32, NasmParser::RuleMemory);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(172);
    match(NasmParser::Mul);
    setState(173);
    lop();
    setState(174);
    reg();
    setState(175);
    rop();
    setState(176);
    match(NasmParser::Lbrace);
    setState(179);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case NasmParser::A0:
      case NasmParser::A1:
      case NasmParser::A2:
      case NasmParser::A3:
      case NasmParser::A4:
      case NasmParser::B0:
      case NasmParser::B1:
      case NasmParser::B2:
      case NasmParser::B3:
      case NasmParser::B4: {
        setState(177);
        reg();
        break;
      }

      case NasmParser::Decimal:
      case NasmParser::Octal:
      case NasmParser::Hex:
      case NasmParser::Binary: {
        setState(178);
        num();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
    setState(181);
    match(NasmParser::Rbrace);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- LopContext ------------------------------------------------------------------

NasmParser::LopContext::LopContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::LopContext::Increment() {
  return getToken(NasmParser::Increment, 0);
}

tree::TerminalNode* NasmParser::LopContext::Add() {
  return getToken(NasmParser::Add, 0);
}

tree::TerminalNode* NasmParser::LopContext::Decrement() {
  return getToken(NasmParser::Decrement, 0);
}

tree::TerminalNode* NasmParser::LopContext::Sub() {
  return getToken(NasmParser::Sub, 0);
}


size_t NasmParser::LopContext::getRuleIndex() const {
  return NasmParser::RuleLop;
}

void NasmParser::LopContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLop(this);
}

void NasmParser::LopContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLop(this);
}


antlrcpp::Any NasmParser::LopContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitLop(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::LopContext* NasmParser::lop() {
  LopContext *_localctx = _tracker.createInstance<LopContext>(_ctx, getState());
  enterRule(_localctx, 34, NasmParser::RuleLop);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(185);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case NasmParser::Add:
      case NasmParser::Sub:
      case NasmParser::Increment:
      case NasmParser::Decrement: {
        enterOuterAlt(_localctx, 1);
        setState(183);
        _la = _input->LA(1);
        if (!((((_la & ~ 0x3fULL) == 0) &&
          ((1ULL << _la) & ((1ULL << NasmParser::Add)
          | (1ULL << NasmParser::Sub)
          | (1ULL << NasmParser::Increment)
          | (1ULL << NasmParser::Decrement))) != 0))) {
        _errHandler->recoverInline(this);
        }
        else {
          _errHandler->reportMatch(this);
          consume();
        }
        break;
      }

      case NasmParser::A0:
      case NasmParser::A1:
      case NasmParser::A2:
      case NasmParser::A3:
      case NasmParser::A4:
      case NasmParser::B0:
      case NasmParser::B1:
      case NasmParser::B2:
      case NasmParser::B3:
      case NasmParser::B4: {
        enterOuterAlt(_localctx, 2);

        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RopContext ------------------------------------------------------------------

NasmParser::RopContext::RopContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::RopContext::Increment() {
  return getToken(NasmParser::Increment, 0);
}

tree::TerminalNode* NasmParser::RopContext::Decrement() {
  return getToken(NasmParser::Decrement, 0);
}


size_t NasmParser::RopContext::getRuleIndex() const {
  return NasmParser::RuleRop;
}

void NasmParser::RopContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRop(this);
}

void NasmParser::RopContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRop(this);
}


antlrcpp::Any NasmParser::RopContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitRop(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::RopContext* NasmParser::rop() {
  RopContext *_localctx = _tracker.createInstance<RopContext>(_ctx, getState());
  enterRule(_localctx, 36, NasmParser::RuleRop);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(189);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case NasmParser::Increment:
      case NasmParser::Decrement: {
        enterOuterAlt(_localctx, 1);
        setState(187);
        _la = _input->LA(1);
        if (!(_la == NasmParser::Increment

        || _la == NasmParser::Decrement)) {
        _errHandler->recoverInline(this);
        }
        else {
          _errHandler->reportMatch(this);
          consume();
        }
        break;
      }

      case NasmParser::Lbrace: {
        enterOuterAlt(_localctx, 2);

        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ExprContext ------------------------------------------------------------------

NasmParser::ExprContext::ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<NasmParser::ItemContext *> NasmParser::ExprContext::item() {
  return getRuleContexts<NasmParser::ItemContext>();
}

NasmParser::ItemContext* NasmParser::ExprContext::item(size_t i) {
  return getRuleContext<NasmParser::ItemContext>(i);
}

std::vector<NasmParser::AddsContext *> NasmParser::ExprContext::adds() {
  return getRuleContexts<NasmParser::AddsContext>();
}

NasmParser::AddsContext* NasmParser::ExprContext::adds(size_t i) {
  return getRuleContext<NasmParser::AddsContext>(i);
}


size_t NasmParser::ExprContext::getRuleIndex() const {
  return NasmParser::RuleExpr;
}

void NasmParser::ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterExpr(this);
}

void NasmParser::ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitExpr(this);
}


antlrcpp::Any NasmParser::ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitExpr(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::ExprContext* NasmParser::expr() {
  ExprContext *_localctx = _tracker.createInstance<ExprContext>(_ctx, getState());
  enterRule(_localctx, 38, NasmParser::RuleExpr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(191);
    item();
    setState(197);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == NasmParser::Add

    || _la == NasmParser::Sub) {
      setState(192);
      adds();
      setState(193);
      item();
      setState(199);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- AddsContext ------------------------------------------------------------------

NasmParser::AddsContext::AddsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::AddsContext::Add() {
  return getToken(NasmParser::Add, 0);
}

tree::TerminalNode* NasmParser::AddsContext::Sub() {
  return getToken(NasmParser::Sub, 0);
}


size_t NasmParser::AddsContext::getRuleIndex() const {
  return NasmParser::RuleAdds;
}

void NasmParser::AddsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAdds(this);
}

void NasmParser::AddsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAdds(this);
}


antlrcpp::Any NasmParser::AddsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitAdds(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::AddsContext* NasmParser::adds() {
  AddsContext *_localctx = _tracker.createInstance<AddsContext>(_ctx, getState());
  enterRule(_localctx, 40, NasmParser::RuleAdds);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(200);
    _la = _input->LA(1);
    if (!(_la == NasmParser::Add

    || _la == NasmParser::Sub)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ItemContext ------------------------------------------------------------------

NasmParser::ItemContext::ItemContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<NasmParser::FactorContext *> NasmParser::ItemContext::factor() {
  return getRuleContexts<NasmParser::FactorContext>();
}

NasmParser::FactorContext* NasmParser::ItemContext::factor(size_t i) {
  return getRuleContext<NasmParser::FactorContext>(i);
}

std::vector<NasmParser::MulsContext *> NasmParser::ItemContext::muls() {
  return getRuleContexts<NasmParser::MulsContext>();
}

NasmParser::MulsContext* NasmParser::ItemContext::muls(size_t i) {
  return getRuleContext<NasmParser::MulsContext>(i);
}


size_t NasmParser::ItemContext::getRuleIndex() const {
  return NasmParser::RuleItem;
}

void NasmParser::ItemContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterItem(this);
}

void NasmParser::ItemContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitItem(this);
}


antlrcpp::Any NasmParser::ItemContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitItem(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::ItemContext* NasmParser::item() {
  ItemContext *_localctx = _tracker.createInstance<ItemContext>(_ctx, getState());
  enterRule(_localctx, 42, NasmParser::RuleItem);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(202);
    factor();
    setState(208);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == NasmParser::Mul

    || _la == NasmParser::Div) {
      setState(203);
      muls();
      setState(204);
      factor();
      setState(210);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- MulsContext ------------------------------------------------------------------

NasmParser::MulsContext::MulsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::MulsContext::Mul() {
  return getToken(NasmParser::Mul, 0);
}

tree::TerminalNode* NasmParser::MulsContext::Div() {
  return getToken(NasmParser::Div, 0);
}


size_t NasmParser::MulsContext::getRuleIndex() const {
  return NasmParser::RuleMuls;
}

void NasmParser::MulsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMuls(this);
}

void NasmParser::MulsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMuls(this);
}


antlrcpp::Any NasmParser::MulsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitMuls(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::MulsContext* NasmParser::muls() {
  MulsContext *_localctx = _tracker.createInstance<MulsContext>(_ctx, getState());
  enterRule(_localctx, 44, NasmParser::RuleMuls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(211);
    _la = _input->LA(1);
    if (!(_la == NasmParser::Mul

    || _la == NasmParser::Div)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FactorContext ------------------------------------------------------------------

NasmParser::FactorContext::FactorContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<NasmParser::ValContext *> NasmParser::FactorContext::val() {
  return getRuleContexts<NasmParser::ValContext>();
}

NasmParser::ValContext* NasmParser::FactorContext::val(size_t i) {
  return getRuleContext<NasmParser::ValContext>(i);
}

std::vector<NasmParser::ShiftContext *> NasmParser::FactorContext::shift() {
  return getRuleContexts<NasmParser::ShiftContext>();
}

NasmParser::ShiftContext* NasmParser::FactorContext::shift(size_t i) {
  return getRuleContext<NasmParser::ShiftContext>(i);
}


size_t NasmParser::FactorContext::getRuleIndex() const {
  return NasmParser::RuleFactor;
}

void NasmParser::FactorContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFactor(this);
}

void NasmParser::FactorContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFactor(this);
}


antlrcpp::Any NasmParser::FactorContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitFactor(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::FactorContext* NasmParser::factor() {
  FactorContext *_localctx = _tracker.createInstance<FactorContext>(_ctx, getState());
  enterRule(_localctx, 46, NasmParser::RuleFactor);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(213);
    val();
    setState(219);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == NasmParser::Lshift

    || _la == NasmParser::Rshift) {
      setState(214);
      shift();
      setState(215);
      val();
      setState(221);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ShiftContext ------------------------------------------------------------------

NasmParser::ShiftContext::ShiftContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::ShiftContext::Lshift() {
  return getToken(NasmParser::Lshift, 0);
}

tree::TerminalNode* NasmParser::ShiftContext::Rshift() {
  return getToken(NasmParser::Rshift, 0);
}


size_t NasmParser::ShiftContext::getRuleIndex() const {
  return NasmParser::RuleShift;
}

void NasmParser::ShiftContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterShift(this);
}

void NasmParser::ShiftContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitShift(this);
}


antlrcpp::Any NasmParser::ShiftContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitShift(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::ShiftContext* NasmParser::shift() {
  ShiftContext *_localctx = _tracker.createInstance<ShiftContext>(_ctx, getState());
  enterRule(_localctx, 48, NasmParser::RuleShift);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(222);
    _la = _input->LA(1);
    if (!(_la == NasmParser::Lshift

    || _la == NasmParser::Rshift)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ValContext ------------------------------------------------------------------

NasmParser::ValContext::ValContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::ValContext::Lparen() {
  return getToken(NasmParser::Lparen, 0);
}

NasmParser::ExprContext* NasmParser::ValContext::expr() {
  return getRuleContext<NasmParser::ExprContext>(0);
}

tree::TerminalNode* NasmParser::ValContext::Rparen() {
  return getToken(NasmParser::Rparen, 0);
}

tree::TerminalNode* NasmParser::ValContext::Id() {
  return getToken(NasmParser::Id, 0);
}

NasmParser::NumContext* NasmParser::ValContext::num() {
  return getRuleContext<NasmParser::NumContext>(0);
}


size_t NasmParser::ValContext::getRuleIndex() const {
  return NasmParser::RuleVal;
}

void NasmParser::ValContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVal(this);
}

void NasmParser::ValContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVal(this);
}


antlrcpp::Any NasmParser::ValContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitVal(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::ValContext* NasmParser::val() {
  ValContext *_localctx = _tracker.createInstance<ValContext>(_ctx, getState());
  enterRule(_localctx, 50, NasmParser::RuleVal);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(230);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case NasmParser::Lparen: {
        enterOuterAlt(_localctx, 1);
        setState(224);
        match(NasmParser::Lparen);
        setState(225);
        expr();
        setState(226);
        match(NasmParser::Rparen);
        break;
      }

      case NasmParser::Id: {
        enterOuterAlt(_localctx, 2);
        setState(228);
        match(NasmParser::Id);
        break;
      }

      case NasmParser::Decimal:
      case NasmParser::Octal:
      case NasmParser::Hex:
      case NasmParser::Binary: {
        enterOuterAlt(_localctx, 3);
        setState(229);
        num();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- NumContext ------------------------------------------------------------------

NasmParser::NumContext::NumContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::NumContext::Decimal() {
  return getToken(NasmParser::Decimal, 0);
}

tree::TerminalNode* NasmParser::NumContext::Octal() {
  return getToken(NasmParser::Octal, 0);
}

tree::TerminalNode* NasmParser::NumContext::Hex() {
  return getToken(NasmParser::Hex, 0);
}

tree::TerminalNode* NasmParser::NumContext::Binary() {
  return getToken(NasmParser::Binary, 0);
}


size_t NasmParser::NumContext::getRuleIndex() const {
  return NasmParser::RuleNum;
}

void NasmParser::NumContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNum(this);
}

void NasmParser::NumContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNum(this);
}


antlrcpp::Any NasmParser::NumContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitNum(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::NumContext* NasmParser::num() {
  NumContext *_localctx = _tracker.createInstance<NumContext>(_ctx, getState());
  enterRule(_localctx, 52, NasmParser::RuleNum);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(232);
    _la = _input->LA(1);
    if (!((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << NasmParser::Decimal)
      | (1ULL << NasmParser::Octal)
      | (1ULL << NasmParser::Hex)
      | (1ULL << NasmParser::Binary))) != 0))) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SizeContext ------------------------------------------------------------------

NasmParser::SizeContext::SizeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* NasmParser::SizeContext::Db() {
  return getToken(NasmParser::Db, 0);
}

tree::TerminalNode* NasmParser::SizeContext::Dw() {
  return getToken(NasmParser::Dw, 0);
}

tree::TerminalNode* NasmParser::SizeContext::Dd() {
  return getToken(NasmParser::Dd, 0);
}

tree::TerminalNode* NasmParser::SizeContext::Dq() {
  return getToken(NasmParser::Dq, 0);
}


size_t NasmParser::SizeContext::getRuleIndex() const {
  return NasmParser::RuleSize;
}

void NasmParser::SizeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSize(this);
}

void NasmParser::SizeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<NasmListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSize(this);
}


antlrcpp::Any NasmParser::SizeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<NasmVisitor*>(visitor))
    return parserVisitor->visitSize(this);
  else
    return visitor->visitChildren(this);
}

NasmParser::SizeContext* NasmParser::size() {
  SizeContext *_localctx = _tracker.createInstance<SizeContext>(_ctx, getState());
  enterRule(_localctx, 54, NasmParser::RuleSize);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(234);
    _la = _input->LA(1);
    if (!((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & ((1ULL << NasmParser::Db)
      | (1ULL << NasmParser::Dw)
      | (1ULL << NasmParser::Dd)
      | (1ULL << NasmParser::Dq))) != 0))) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

// Static vars and initialization.
std::vector<dfa::DFA> NasmParser::_decisionToDFA;
atn::PredictionContextCache NasmParser::_sharedContextCache;

// We own the ATN which in turn owns the ATN states.
atn::ATN NasmParser::_atn;
std::vector<uint16_t> NasmParser::_serializedATN;

std::vector<std::string> NasmParser::_ruleNames = {
  "program", "statement", "declare", "idTail", "data", "type", "sign", "instructionPacket", 
  "instruction", "threeOp", "twoOp", "oneOp", "noneOp", "operand", "regs", 
  "reg", "memory", "lop", "rop", "expr", "adds", "item", "muls", "factor", 
  "shift", "val", "num", "size"
};

std::vector<std::string> NasmParser::_literalNames = {
  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "'+'", 
  "'-'", "'*'", "'\\'", "'<<'", "'>>'", "'['", "']'", "'('", "')'", "'='", 
  "'++'", "'--'", "'||'", "':'", "','", "';'"
};

std::vector<std::string> NasmParser::_symbolicNames = {
  "", "A0", "A1", "A2", "A3", "A4", "B0", "B1", "B2", "B3", "B4", "Decimal", 
  "Octal", "Hex", "Binary", "WS", "Vstart", "Global", "Externed", "Section", 
  "Equ", "Times", "Bits", "Db", "Dw", "Dd", "Dq", "ADD", "SUB", "MVK", "MV", 
  "NOP", "FuncUnit", "Id", "Char", "Add", "Sub", "Mul", "Div", "Lshift", 
  "Rshift", "Lbrace", "Rbrace", "Lparen", "Rparen", "Equal", "Increment", 
  "Decrement", "Or", "Colon", "Comma", "Semicolon", "A", "B", "C", "D", 
  "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", 
  "S", "T", "U", "V", "W", "X", "Y", "Z"
};

dfa::Vocabulary NasmParser::_vocabulary(_literalNames, _symbolicNames);

std::vector<std::string> NasmParser::_tokenNames;

NasmParser::Initializer::Initializer() {
	for (size_t i = 0; i < _symbolicNames.size(); ++i) {
		std::string name = _vocabulary.getLiteralName(i);
		if (name.empty()) {
			name = _vocabulary.getSymbolicName(i);
		}

		if (name.empty()) {
			_tokenNames.push_back("<INVALID>");
		} else {
      _tokenNames.push_back(name);
    }
	}

  static const uint16_t serializedATNSegment0[] = {
    0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964, 
       0x3, 0x4f, 0xef, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, 0x4, 0x4, 
       0x9, 0x4, 0x4, 0x5, 0x9, 0x5, 0x4, 0x6, 0x9, 0x6, 0x4, 0x7, 0x9, 
       0x7, 0x4, 0x8, 0x9, 0x8, 0x4, 0x9, 0x9, 0x9, 0x4, 0xa, 0x9, 0xa, 
       0x4, 0xb, 0x9, 0xb, 0x4, 0xc, 0x9, 0xc, 0x4, 0xd, 0x9, 0xd, 0x4, 
       0xe, 0x9, 0xe, 0x4, 0xf, 0x9, 0xf, 0x4, 0x10, 0x9, 0x10, 0x4, 0x11, 
       0x9, 0x11, 0x4, 0x12, 0x9, 0x12, 0x4, 0x13, 0x9, 0x13, 0x4, 0x14, 
       0x9, 0x14, 0x4, 0x15, 0x9, 0x15, 0x4, 0x16, 0x9, 0x16, 0x4, 0x17, 
       0x9, 0x17, 0x4, 0x18, 0x9, 0x18, 0x4, 0x19, 0x9, 0x19, 0x4, 0x1a, 
       0x9, 0x1a, 0x4, 0x1b, 0x9, 0x1b, 0x4, 0x1c, 0x9, 0x1c, 0x4, 0x1d, 
       0x9, 0x1d, 0x3, 0x2, 0x7, 0x2, 0x3c, 0xa, 0x2, 0xc, 0x2, 0xe, 0x2, 
       0x3f, 0xb, 0x2, 0x3, 0x2, 0x3, 0x2, 0x3, 0x3, 0x3, 0x3, 0x5, 0x3, 
       0x45, 0xa, 0x3, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 
       0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 
       0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 
       0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x5, 0x4, 0x5c, 0xa, 0x4, 0x3, 0x5, 
       0x3, 0x5, 0x3, 0x5, 0x5, 0x5, 0x61, 0xa, 0x5, 0x3, 0x6, 0x3, 0x6, 
       0x3, 0x6, 0x7, 0x6, 0x66, 0xa, 0x6, 0xc, 0x6, 0xe, 0x6, 0x69, 0xb, 
       0x6, 0x3, 0x7, 0x5, 0x7, 0x6c, 0xa, 0x7, 0x3, 0x7, 0x3, 0x7, 0x3, 
       0x7, 0x5, 0x7, 0x71, 0xa, 0x7, 0x3, 0x8, 0x3, 0x8, 0x3, 0x9, 0x3, 
       0x9, 0x3, 0x9, 0x7, 0x9, 0x78, 0xa, 0x9, 0xc, 0x9, 0xe, 0x9, 0x7b, 
       0xb, 0x9, 0x3, 0xa, 0x3, 0xa, 0x5, 0xa, 0x7f, 0xa, 0xa, 0x3, 0xa, 
       0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 
       0xa, 0x5, 0xa, 0x89, 0xa, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 
       0xa, 0x3, 0xa, 0x3, 0xa, 0x5, 0xa, 0x91, 0xa, 0xa, 0x3, 0xa, 0x3, 
       0xa, 0x3, 0xa, 0x3, 0xa, 0x5, 0xa, 0x97, 0xa, 0xa, 0x5, 0xa, 0x99, 
       0xa, 0xa, 0x3, 0xb, 0x3, 0xb, 0x3, 0xc, 0x3, 0xc, 0x3, 0xd, 0x3, 
       0xd, 0x3, 0xe, 0x3, 0xe, 0x3, 0xf, 0x3, 0xf, 0x3, 0xf, 0x5, 0xf, 
       0xa6, 0xa, 0xf, 0x3, 0x10, 0x3, 0x10, 0x3, 0x10, 0x5, 0x10, 0xab, 
       0xa, 0x10, 0x3, 0x11, 0x3, 0x11, 0x3, 0x12, 0x3, 0x12, 0x3, 0x12, 
       0x3, 0x12, 0x3, 0x12, 0x3, 0x12, 0x3, 0x12, 0x5, 0x12, 0xb6, 0xa, 
       0x12, 0x3, 0x12, 0x3, 0x12, 0x3, 0x13, 0x3, 0x13, 0x5, 0x13, 0xbc, 
       0xa, 0x13, 0x3, 0x14, 0x3, 0x14, 0x5, 0x14, 0xc0, 0xa, 0x14, 0x3, 
       0x15, 0x3, 0x15, 0x3, 0x15, 0x3, 0x15, 0x7, 0x15, 0xc6, 0xa, 0x15, 
       0xc, 0x15, 0xe, 0x15, 0xc9, 0xb, 0x15, 0x3, 0x16, 0x3, 0x16, 0x3, 
       0x17, 0x3, 0x17, 0x3, 0x17, 0x3, 0x17, 0x7, 0x17, 0xd1, 0xa, 0x17, 
       0xc, 0x17, 0xe, 0x17, 0xd4, 0xb, 0x17, 0x3, 0x18, 0x3, 0x18, 0x3, 
       0x19, 0x3, 0x19, 0x3, 0x19, 0x3, 0x19, 0x7, 0x19, 0xdc, 0xa, 0x19, 
       0xc, 0x19, 0xe, 0x19, 0xdf, 0xb, 0x19, 0x3, 0x1a, 0x3, 0x1a, 0x3, 
       0x1b, 0x3, 0x1b, 0x3, 0x1b, 0x3, 0x1b, 0x3, 0x1b, 0x3, 0x1b, 0x5, 
       0x1b, 0xe9, 0xa, 0x1b, 0x3, 0x1c, 0x3, 0x1c, 0x3, 0x1d, 0x3, 0x1d, 
       0x3, 0x1d, 0x2, 0x2, 0x1e, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 
       0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, 0x20, 0x22, 0x24, 0x26, 
       0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36, 0x38, 0x2, 0xc, 0x3, 
       0x2, 0x25, 0x26, 0x3, 0x2, 0x1d, 0x1e, 0x3, 0x2, 0x1f, 0x20, 0x3, 
       0x2, 0x3, 0xc, 0x4, 0x2, 0x25, 0x26, 0x30, 0x31, 0x3, 0x2, 0x30, 
       0x31, 0x3, 0x2, 0x27, 0x28, 0x3, 0x2, 0x29, 0x2a, 0x3, 0x2, 0xd, 
       0x10, 0x3, 0x2, 0x19, 0x1c, 0x2, 0xf2, 0x2, 0x3d, 0x3, 0x2, 0x2, 
       0x2, 0x4, 0x44, 0x3, 0x2, 0x2, 0x2, 0x6, 0x5b, 0x3, 0x2, 0x2, 0x2, 
       0x8, 0x60, 0x3, 0x2, 0x2, 0x2, 0xa, 0x62, 0x3, 0x2, 0x2, 0x2, 0xc, 
       0x70, 0x3, 0x2, 0x2, 0x2, 0xe, 0x72, 0x3, 0x2, 0x2, 0x2, 0x10, 0x74, 
       0x3, 0x2, 0x2, 0x2, 0x12, 0x98, 0x3, 0x2, 0x2, 0x2, 0x14, 0x9a, 0x3, 
       0x2, 0x2, 0x2, 0x16, 0x9c, 0x3, 0x2, 0x2, 0x2, 0x18, 0x9e, 0x3, 0x2, 
       0x2, 0x2, 0x1a, 0xa0, 0x3, 0x2, 0x2, 0x2, 0x1c, 0xa5, 0x3, 0x2, 0x2, 
       0x2, 0x1e, 0xa7, 0x3, 0x2, 0x2, 0x2, 0x20, 0xac, 0x3, 0x2, 0x2, 0x2, 
       0x22, 0xae, 0x3, 0x2, 0x2, 0x2, 0x24, 0xbb, 0x3, 0x2, 0x2, 0x2, 0x26, 
       0xbf, 0x3, 0x2, 0x2, 0x2, 0x28, 0xc1, 0x3, 0x2, 0x2, 0x2, 0x2a, 0xca, 
       0x3, 0x2, 0x2, 0x2, 0x2c, 0xcc, 0x3, 0x2, 0x2, 0x2, 0x2e, 0xd5, 0x3, 
       0x2, 0x2, 0x2, 0x30, 0xd7, 0x3, 0x2, 0x2, 0x2, 0x32, 0xe0, 0x3, 0x2, 
       0x2, 0x2, 0x34, 0xe8, 0x3, 0x2, 0x2, 0x2, 0x36, 0xea, 0x3, 0x2, 0x2, 
       0x2, 0x38, 0xec, 0x3, 0x2, 0x2, 0x2, 0x3a, 0x3c, 0x5, 0x4, 0x3, 0x2, 
       0x3b, 0x3a, 0x3, 0x2, 0x2, 0x2, 0x3c, 0x3f, 0x3, 0x2, 0x2, 0x2, 0x3d, 
       0x3b, 0x3, 0x2, 0x2, 0x2, 0x3d, 0x3e, 0x3, 0x2, 0x2, 0x2, 0x3e, 0x40, 
       0x3, 0x2, 0x2, 0x2, 0x3f, 0x3d, 0x3, 0x2, 0x2, 0x2, 0x40, 0x41, 0x7, 
       0x2, 0x2, 0x3, 0x41, 0x3, 0x3, 0x2, 0x2, 0x2, 0x42, 0x45, 0x5, 0x6, 
       0x4, 0x2, 0x43, 0x45, 0x5, 0x10, 0x9, 0x2, 0x44, 0x42, 0x3, 0x2, 
       0x2, 0x2, 0x44, 0x43, 0x3, 0x2, 0x2, 0x2, 0x45, 0x5, 0x3, 0x2, 0x2, 
       0x2, 0x46, 0x47, 0x7, 0x15, 0x2, 0x2, 0x47, 0x5c, 0x7, 0x23, 0x2, 
       0x2, 0x48, 0x49, 0x7, 0x13, 0x2, 0x2, 0x49, 0x5c, 0x7, 0x23, 0x2, 
       0x2, 0x4a, 0x4b, 0x7, 0x14, 0x2, 0x2, 0x4b, 0x5c, 0x7, 0x23, 0x2, 
       0x2, 0x4c, 0x4d, 0x7, 0x23, 0x2, 0x2, 0x4d, 0x5c, 0x5, 0x8, 0x5, 
       0x2, 0x4e, 0x4f, 0x7, 0x2b, 0x2, 0x2, 0x4f, 0x50, 0x7, 0x18, 0x2, 
       0x2, 0x50, 0x51, 0x5, 0x36, 0x1c, 0x2, 0x51, 0x52, 0x7, 0x2c, 0x2, 
       0x2, 0x52, 0x5c, 0x3, 0x2, 0x2, 0x2, 0x53, 0x54, 0x7, 0x17, 0x2, 
       0x2, 0x54, 0x55, 0x5, 0x36, 0x1c, 0x2, 0x55, 0x56, 0x5, 0x38, 0x1d, 
       0x2, 0x56, 0x57, 0x5, 0xc, 0x7, 0x2, 0x57, 0x5c, 0x3, 0x2, 0x2, 0x2, 
       0x58, 0x59, 0x5, 0x38, 0x1d, 0x2, 0x59, 0x5a, 0x5, 0xa, 0x6, 0x2, 
       0x5a, 0x5c, 0x3, 0x2, 0x2, 0x2, 0x5b, 0x46, 0x3, 0x2, 0x2, 0x2, 0x5b, 
       0x48, 0x3, 0x2, 0x2, 0x2, 0x5b, 0x4a, 0x3, 0x2, 0x2, 0x2, 0x5b, 0x4c, 
       0x3, 0x2, 0x2, 0x2, 0x5b, 0x4e, 0x3, 0x2, 0x2, 0x2, 0x5b, 0x53, 0x3, 
       0x2, 0x2, 0x2, 0x5b, 0x58, 0x3, 0x2, 0x2, 0x2, 0x5c, 0x7, 0x3, 0x2, 
       0x2, 0x2, 0x5d, 0x61, 0x7, 0x33, 0x2, 0x2, 0x5e, 0x5f, 0x7, 0x16, 
       0x2, 0x2, 0x5f, 0x61, 0x5, 0x28, 0x15, 0x2, 0x60, 0x5d, 0x3, 0x2, 
       0x2, 0x2, 0x60, 0x5e, 0x3, 0x2, 0x2, 0x2, 0x61, 0x9, 0x3, 0x2, 0x2, 
       0x2, 0x62, 0x67, 0x5, 0xc, 0x7, 0x2, 0x63, 0x64, 0x7, 0x34, 0x2, 
       0x2, 0x64, 0x66, 0x5, 0xc, 0x7, 0x2, 0x65, 0x63, 0x3, 0x2, 0x2, 0x2, 
       0x66, 0x69, 0x3, 0x2, 0x2, 0x2, 0x67, 0x65, 0x3, 0x2, 0x2, 0x2, 0x67, 
       0x68, 0x3, 0x2, 0x2, 0x2, 0x68, 0xb, 0x3, 0x2, 0x2, 0x2, 0x69, 0x67, 
       0x3, 0x2, 0x2, 0x2, 0x6a, 0x6c, 0x5, 0xe, 0x8, 0x2, 0x6b, 0x6a, 0x3, 
       0x2, 0x2, 0x2, 0x6b, 0x6c, 0x3, 0x2, 0x2, 0x2, 0x6c, 0x6d, 0x3, 0x2, 
       0x2, 0x2, 0x6d, 0x71, 0x5, 0x36, 0x1c, 0x2, 0x6e, 0x71, 0x7, 0x23, 
       0x2, 0x2, 0x6f, 0x71, 0x7, 0x24, 0x2, 0x2, 0x70, 0x6b, 0x3, 0x2, 
       0x2, 0x2, 0x70, 0x6e, 0x3, 0x2, 0x2, 0x2, 0x70, 0x6f, 0x3, 0x2, 0x2, 
       0x2, 0x71, 0xd, 0x3, 0x2, 0x2, 0x2, 0x72, 0x73, 0x9, 0x2, 0x2, 0x2, 
       0x73, 0xf, 0x3, 0x2, 0x2, 0x2, 0x74, 0x79, 0x5, 0x12, 0xa, 0x2, 0x75, 
       0x76, 0x7, 0x32, 0x2, 0x2, 0x76, 0x78, 0x5, 0x12, 0xa, 0x2, 0x77, 
       0x75, 0x3, 0x2, 0x2, 0x2, 0x78, 0x7b, 0x3, 0x2, 0x2, 0x2, 0x79, 0x77, 
       0x3, 0x2, 0x2, 0x2, 0x79, 0x7a, 0x3, 0x2, 0x2, 0x2, 0x7a, 0x11, 0x3, 
       0x2, 0x2, 0x2, 0x7b, 0x79, 0x3, 0x2, 0x2, 0x2, 0x7c, 0x7e, 0x5, 0x14, 
       0xb, 0x2, 0x7d, 0x7f, 0x7, 0x22, 0x2, 0x2, 0x7e, 0x7d, 0x3, 0x2, 
       0x2, 0x2, 0x7e, 0x7f, 0x3, 0x2, 0x2, 0x2, 0x7f, 0x80, 0x3, 0x2, 0x2, 
       0x2, 0x80, 0x81, 0x5, 0x1c, 0xf, 0x2, 0x81, 0x82, 0x7, 0x34, 0x2, 
       0x2, 0x82, 0x83, 0x5, 0x1c, 0xf, 0x2, 0x83, 0x84, 0x7, 0x34, 0x2, 
       0x2, 0x84, 0x85, 0x5, 0x1c, 0xf, 0x2, 0x85, 0x99, 0x3, 0x2, 0x2, 
       0x2, 0x86, 0x88, 0x5, 0x16, 0xc, 0x2, 0x87, 0x89, 0x7, 0x22, 0x2, 
       0x2, 0x88, 0x87, 0x3, 0x2, 0x2, 0x2, 0x88, 0x89, 0x3, 0x2, 0x2, 0x2, 
       0x89, 0x8a, 0x3, 0x2, 0x2, 0x2, 0x8a, 0x8b, 0x5, 0x1c, 0xf, 0x2, 
       0x8b, 0x8c, 0x7, 0x34, 0x2, 0x2, 0x8c, 0x8d, 0x5, 0x1c, 0xf, 0x2, 
       0x8d, 0x99, 0x3, 0x2, 0x2, 0x2, 0x8e, 0x90, 0x5, 0x18, 0xd, 0x2, 
       0x8f, 0x91, 0x7, 0x22, 0x2, 0x2, 0x90, 0x8f, 0x3, 0x2, 0x2, 0x2, 
       0x90, 0x91, 0x3, 0x2, 0x2, 0x2, 0x91, 0x92, 0x3, 0x2, 0x2, 0x2, 0x92, 
       0x93, 0x5, 0x1c, 0xf, 0x2, 0x93, 0x99, 0x3, 0x2, 0x2, 0x2, 0x94, 
       0x96, 0x5, 0x1a, 0xe, 0x2, 0x95, 0x97, 0x7, 0x22, 0x2, 0x2, 0x96, 
       0x95, 0x3, 0x2, 0x2, 0x2, 0x96, 0x97, 0x3, 0x2, 0x2, 0x2, 0x97, 0x99, 
       0x3, 0x2, 0x2, 0x2, 0x98, 0x7c, 0x3, 0x2, 0x2, 0x2, 0x98, 0x86, 0x3, 
       0x2, 0x2, 0x2, 0x98, 0x8e, 0x3, 0x2, 0x2, 0x2, 0x98, 0x94, 0x3, 0x2, 
       0x2, 0x2, 0x99, 0x13, 0x3, 0x2, 0x2, 0x2, 0x9a, 0x9b, 0x9, 0x3, 0x2, 
       0x2, 0x9b, 0x15, 0x3, 0x2, 0x2, 0x2, 0x9c, 0x9d, 0x9, 0x4, 0x2, 0x2, 
       0x9d, 0x17, 0x3, 0x2, 0x2, 0x2, 0x9e, 0x9f, 0x7, 0x21, 0x2, 0x2, 
       0x9f, 0x19, 0x3, 0x2, 0x2, 0x2, 0xa0, 0xa1, 0x7, 0x21, 0x2, 0x2, 
       0xa1, 0x1b, 0x3, 0x2, 0x2, 0x2, 0xa2, 0xa6, 0x5, 0xc, 0x7, 0x2, 0xa3, 
       0xa6, 0x5, 0x1e, 0x10, 0x2, 0xa4, 0xa6, 0x5, 0x22, 0x12, 0x2, 0xa5, 
       0xa2, 0x3, 0x2, 0x2, 0x2, 0xa5, 0xa3, 0x3, 0x2, 0x2, 0x2, 0xa5, 0xa4, 
       0x3, 0x2, 0x2, 0x2, 0xa6, 0x1d, 0x3, 0x2, 0x2, 0x2, 0xa7, 0xaa, 0x5, 
       0x20, 0x11, 0x2, 0xa8, 0xa9, 0x7, 0x33, 0x2, 0x2, 0xa9, 0xab, 0x5, 
       0x20, 0x11, 0x2, 0xaa, 0xa8, 0x3, 0x2, 0x2, 0x2, 0xaa, 0xab, 0x3, 
       0x2, 0x2, 0x2, 0xab, 0x1f, 0x3, 0x2, 0x2, 0x2, 0xac, 0xad, 0x9, 0x5, 
       0x2, 0x2, 0xad, 0x21, 0x3, 0x2, 0x2, 0x2, 0xae, 0xaf, 0x7, 0x27, 
       0x2, 0x2, 0xaf, 0xb0, 0x5, 0x24, 0x13, 0x2, 0xb0, 0xb1, 0x5, 0x20, 
       0x11, 0x2, 0xb1, 0xb2, 0x5, 0x26, 0x14, 0x2, 0xb2, 0xb5, 0x7, 0x2b, 
       0x2, 0x2, 0xb3, 0xb6, 0x5, 0x20, 0x11, 0x2, 0xb4, 0xb6, 0x5, 0x36, 
       0x1c, 0x2, 0xb5, 0xb3, 0x3, 0x2, 0x2, 0x2, 0xb5, 0xb4, 0x3, 0x2, 
       0x2, 0x2, 0xb6, 0xb7, 0x3, 0x2, 0x2, 0x2, 0xb7, 0xb8, 0x7, 0x2c, 
       0x2, 0x2, 0xb8, 0x23, 0x3, 0x2, 0x2, 0x2, 0xb9, 0xbc, 0x9, 0x6, 0x2, 
       0x2, 0xba, 0xbc, 0x3, 0x2, 0x2, 0x2, 0xbb, 0xb9, 0x3, 0x2, 0x2, 0x2, 
       0xbb, 0xba, 0x3, 0x2, 0x2, 0x2, 0xbc, 0x25, 0x3, 0x2, 0x2, 0x2, 0xbd, 
       0xc0, 0x9, 0x7, 0x2, 0x2, 0xbe, 0xc0, 0x3, 0x2, 0x2, 0x2, 0xbf, 0xbd, 
       0x3, 0x2, 0x2, 0x2, 0xbf, 0xbe, 0x3, 0x2, 0x2, 0x2, 0xc0, 0x27, 0x3, 
       0x2, 0x2, 0x2, 0xc1, 0xc7, 0x5, 0x2c, 0x17, 0x2, 0xc2, 0xc3, 0x5, 
       0x2a, 0x16, 0x2, 0xc3, 0xc4, 0x5, 0x2c, 0x17, 0x2, 0xc4, 0xc6, 0x3, 
       0x2, 0x2, 0x2, 0xc5, 0xc2, 0x3, 0x2, 0x2, 0x2, 0xc6, 0xc9, 0x3, 0x2, 
       0x2, 0x2, 0xc7, 0xc5, 0x3, 0x2, 0x2, 0x2, 0xc7, 0xc8, 0x3, 0x2, 0x2, 
       0x2, 0xc8, 0x29, 0x3, 0x2, 0x2, 0x2, 0xc9, 0xc7, 0x3, 0x2, 0x2, 0x2, 
       0xca, 0xcb, 0x9, 0x2, 0x2, 0x2, 0xcb, 0x2b, 0x3, 0x2, 0x2, 0x2, 0xcc, 
       0xd2, 0x5, 0x30, 0x19, 0x2, 0xcd, 0xce, 0x5, 0x2e, 0x18, 0x2, 0xce, 
       0xcf, 0x5, 0x30, 0x19, 0x2, 0xcf, 0xd1, 0x3, 0x2, 0x2, 0x2, 0xd0, 
       0xcd, 0x3, 0x2, 0x2, 0x2, 0xd1, 0xd4, 0x3, 0x2, 0x2, 0x2, 0xd2, 0xd0, 
       0x3, 0x2, 0x2, 0x2, 0xd2, 0xd3, 0x3, 0x2, 0x2, 0x2, 0xd3, 0x2d, 0x3, 
       0x2, 0x2, 0x2, 0xd4, 0xd2, 0x3, 0x2, 0x2, 0x2, 0xd5, 0xd6, 0x9, 0x8, 
       0x2, 0x2, 0xd6, 0x2f, 0x3, 0x2, 0x2, 0x2, 0xd7, 0xdd, 0x5, 0x34, 
       0x1b, 0x2, 0xd8, 0xd9, 0x5, 0x32, 0x1a, 0x2, 0xd9, 0xda, 0x5, 0x34, 
       0x1b, 0x2, 0xda, 0xdc, 0x3, 0x2, 0x2, 0x2, 0xdb, 0xd8, 0x3, 0x2, 
       0x2, 0x2, 0xdc, 0xdf, 0x3, 0x2, 0x2, 0x2, 0xdd, 0xdb, 0x3, 0x2, 0x2, 
       0x2, 0xdd, 0xde, 0x3, 0x2, 0x2, 0x2, 0xde, 0x31, 0x3, 0x2, 0x2, 0x2, 
       0xdf, 0xdd, 0x3, 0x2, 0x2, 0x2, 0xe0, 0xe1, 0x9, 0x9, 0x2, 0x2, 0xe1, 
       0x33, 0x3, 0x2, 0x2, 0x2, 0xe2, 0xe3, 0x7, 0x2d, 0x2, 0x2, 0xe3, 
       0xe4, 0x5, 0x28, 0x15, 0x2, 0xe4, 0xe5, 0x7, 0x2e, 0x2, 0x2, 0xe5, 
       0xe9, 0x3, 0x2, 0x2, 0x2, 0xe6, 0xe9, 0x7, 0x23, 0x2, 0x2, 0xe7, 
       0xe9, 0x5, 0x36, 0x1c, 0x2, 0xe8, 0xe2, 0x3, 0x2, 0x2, 0x2, 0xe8, 
       0xe6, 0x3, 0x2, 0x2, 0x2, 0xe8, 0xe7, 0x3, 0x2, 0x2, 0x2, 0xe9, 0x35, 
       0x3, 0x2, 0x2, 0x2, 0xea, 0xeb, 0x9, 0xa, 0x2, 0x2, 0xeb, 0x37, 0x3, 
       0x2, 0x2, 0x2, 0xec, 0xed, 0x9, 0xb, 0x2, 0x2, 0xed, 0x39, 0x3, 0x2, 
       0x2, 0x2, 0x18, 0x3d, 0x44, 0x5b, 0x60, 0x67, 0x6b, 0x70, 0x79, 0x7e, 
       0x88, 0x90, 0x96, 0x98, 0xa5, 0xaa, 0xb5, 0xbb, 0xbf, 0xc7, 0xd2, 
       0xdd, 0xe8, 
  };

  _serializedATN.insert(_serializedATN.end(), serializedATNSegment0,
    serializedATNSegment0 + sizeof(serializedATNSegment0) / sizeof(serializedATNSegment0[0]));


  atn::ATNDeserializer deserializer;
  _atn = deserializer.deserialize(_serializedATN);

  size_t count = _atn.getNumberOfDecisions();
  _decisionToDFA.reserve(count);
  for (size_t i = 0; i < count; i++) { 
    _decisionToDFA.emplace_back(_atn.getDecisionState(i), i);
  }
}

NasmParser::Initializer NasmParser::_init;
